<div class="layui-content">
    <!-- 最新笔记 -->
    <div class="note layui-bg-gray">
        <h3>最新笔记</h3>
        <div class="layui-container">
            {#each note as v,k}
            <div class="layui-box">
                <h3>{v.title}</h3>
                <p>{v.description}</p>
                <div class="layui-box-tools">
                    <span>发布时间：{v.created_at}</span>
                    <a href="javascript:;" onclick="layui.app.navigateTo('note.detail','id={v.id}')" class="layui-btn layui-btn-xs">立即前往</a>
                </div>
            </div>
            {/each}
        </div>
    </div>
    <div class="layui-container">
        <!-- 分页 -->
        <div class="layui-page">
            <div class="layui-paging">
                {#each paging.count as v,k}
                {#if (v+1)== paging.page}
                <div class="layui-item layui-bg-green">
                    <span class="layui-font-gray">{v+1}</span>
                </div>
                {:else}
                <div class="layui-item">
                    <a href="javascript:;">{v+1}</a>
                </div>
                {/if}
                {/each}
            </div>
        </div>
    </div>
</div>